<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateShippingTemplatesFreesTable extends Migration
{
    /**
     * 运费模板指定城市运费表
     *
     * @return void
     */
    public function up()
    {
        Schema::create('shipping_templates_frees', function (Blueprint $table) {
            $table->id()->comment('运费模板指定城市运费表');
            $table->integer('province_id')->index()->comment('省id');
            $table->integer('temp_id')->index()->comment('模板id');
            $table->integer('city_id')->index()->comment('城市id');
            $table->decimal('number',10)->comment('包邮件数');
            $table->decimal('price',10,2)->comment('包邮金额');
            $table->string('free_type',16)->comment('计费方式:typeLet_one 按件数  typeLet_two 按重量  typeLet_three按体积');
            $table->string('uniqid')->comment('分组唯一值');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('shipping_templates_frees');
    }
}
